-- GENERATED SPELL FOR [Thrall] --


function spell0_32518(pUnit, Event) --@Chain Lightning,n/a--
pUnit:FullCastSpellOnTarget(59517,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32518', 1500, 1)
end

function spell1_32518(pUnit, Event) --@Lava Burst,n/a--
pUnit:FullCastSpellOnTarget(59519,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32518', 1500, 1)
end

function spell2_32518(pUnit, Event) --@Thunder,Self--
pUnit:FullCastSpellOnTarget(59507,pUnit)
pUnit:RegisterEvent('Sorts_32518', 567, 1)
end

function spell3_32518(pUnit, Event) --@Warchief\'s Blessing,n/a--
pUnit:FullCastSpellOnTarget(61212,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32518', 0, 1)
end

function Sorts_32518(pUnit, Event)
local choix_sorts_32518 = math.random(0, 3)
if choix_sorts_32518 == 0 then
pUnit:RegisterEvent('spell0_32518', 1, 1)
end
if choix_sorts_32518 == 1 then
pUnit:RegisterEvent('spell1_32518', 1, 1)
end
if choix_sorts_32518 == 2 then
pUnit:RegisterEvent('spell2_32518', 1, 1)
end
if choix_sorts_32518 == 3 then
pUnit:RegisterEvent('spell3_32518', 1, 1)
end
end

function mob32518_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32518', math.random(1500, 3000), 1)
end

function mob32518_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32518_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32518_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32518, 1, 'mob32518_Action')
RegisterUnitEvent(32518, 2, 'mob32518_Leave')
RegisterUnitEvent(32518, 3, 'mob32518_Kill')
RegisterUnitEvent(32518, 4, 'mob32518_Die')
